import 'package:flutter/material.dart';

class SearchPage extends StatelessWidget {
  final String title;

  SearchPage({this.title = '未传入名称'});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      floatingActionButton: FloatingActionButton(
        onPressed: () {
          //返回上一级页面
          Navigator.of(context).pop();
        },
        child: Text("返回"),
      ),
      appBar: AppBar(
        title: Text(this.title),
      ),
      body: Center(
        child: Text("我是搜索页面"),
      ),
    );
  }
}
